/* ========================================
   EhViewer Official Website - Styles
   ======================================== */

/* CSS Variables */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #1e1b4b;
    --accent: #f59e0b;
    
    --bg-dark: #0f0d1a;
    --bg-card: #1a1625;
    --bg-card-hover: #252136;
    
    --text-primary: #ffffff;
    --text-secondary: #a5a3b3;
    --text-muted: #6b6880;
    
    --border-color: #2d2a3e;
    
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-bg: linear-gradient(180deg, #0f0d1a 0%, #1a1625 100%);
    
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
    
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}

.btn-lg {
    padding: 16px 32px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 20px;
    height: 20px;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px 0;
    background: transparent;
    transition: var(--transition);
}

.navbar.scrolled {
    background: rgba(15, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.logo-icon {
    font-size: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    position: relative;
}

.nav-links a:not(.btn):hover {
    color: var(--text-primary);
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition);
}

.nav-links a:not(.btn):hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 0 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(139, 92, 246, 0.15), transparent);
    z-index: -1;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 500;
    color: var(--primary-light);
    margin-bottom: 24px;
}

.hero-title {
    font-size: 64px;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #a5a3b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 16px;
}

.hero-subtitle {
    font-size: 24px;
    color: var(--primary-light);
    margin-bottom: 16px;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 14px;
    color: var(--text-muted);
}

/* Phone Mockup */
.hero-image {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    position: relative;
    width: 280px;
    height: 560px;
    background: #1a1625;
    border-radius: 40px;
    padding: 12px;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border: 3px solid #2d2a3e;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    border-radius: 28px;
    overflow: hidden;
}

.app-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 16px;
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 16px;
    flex: 1;
}

.app-card {
    background: linear-gradient(135deg, #374151, #1f2937);
    border-radius: var(--radius-md);
    aspect-ratio: 3/4;
    animation: pulse 2s ease-in-out infinite;
}

.app-card:nth-child(2) { animation-delay: 0.2s; }
.app-card:nth-child(3) { animation-delay: 0.4s; }
.app-card:nth-child(4) { animation-delay: 0.6s; }
.app-card:nth-child(5) { animation-delay: 0.8s; }
.app-card:nth-child(6) { animation-delay: 1s; }

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-badge {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.15);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: 42px;
    margin-bottom: 16px;
}

.section-description {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ========================================
   Features Section
   ======================================== */
.features {
    background: var(--gradient-bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ========================================
   Download Section
   ======================================== */
.download {
    background: var(--bg-dark);
}

.download-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.download-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
}

.download-card.featured {
    border-color: var(--primary);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, var(--bg-card) 100%);
}

.download-card-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-primary);
    color: white;
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
}

.download-card-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.download-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.download-card .version {
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 8px;
}

.download-card .description {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.download-info {
    text-align: left;
    margin-bottom: 24px;
}

.download-info li {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.download-info li:last-child {
    border-bottom: none;
}

.download-note {
    text-align: center;
    padding: 20px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
}

/* ========================================
   Guide Section
   ======================================== */
.guide {
    background: var(--gradient-bg);
}

.guide-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.guide-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 280px;
}

.step-number {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border-radius: 50%;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
    box-shadow: var(--shadow-glow);
}

.step-content h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 15px;
}

.guide-connector {
    width: 80px;
    height: 2px;
    background: var(--border-color);
    margin-bottom: 60px;
}

/* ========================================
   FAQ Section
   ======================================== */
.faq {
    background: var(--bg-dark);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-card);
    border: none;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-card-hover);
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    transition: var(--transition);
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--primary);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ========================================
   Changelog Section
   ======================================== */
.changelog {
    background: var(--gradient-bg);
}

.changelog-list {
    max-width: 800px;
    margin: 0 auto;
}

.changelog-item {
    position: relative;
    padding-left: 32px;
    padding-bottom: 40px;
    border-left: 2px solid var(--border-color);
}

.changelog-item::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    background: var(--primary);
    border-radius: 50%;
}

.changelog-item:last-child {
    padding-bottom: 0;
}

.changelog-version {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.version-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
}

.version-tag.latest {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--primary);
    color: var(--primary-light);
}

.version-date {
    color: var(--text-muted);
    font-size: 14px;
}

.changelog-content h4 {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 16px 0 8px;
}

.changelog-content h4:first-child {
    margin-top: 0;
}

.changelog-content ul {
    list-style: disc;
    padding-left: 20px;
}

.changelog-content li {
    color: var(--text-secondary);
    font-size: 15px;
    padding: 4px 0;
}

.changelog-more {
    text-align: center;
    margin-top: 40px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    margin: 20px 0;
    max-width: 300px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--primary);
    color: white;
}

.footer-social svg {
    width: 20px;
    height: 20px;
}

.footer-links h4 {
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 15px;
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 14px;
}

.footer-bottom .disclaimer {
    margin-top: 8px;
    font-size: 12px;
}

/* ========================================
   Back to Top Button
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    z-index: 999;
    box-shadow: var(--shadow-glow);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    color: white;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-image {
        order: -1;
    }
    
    .phone-mockup {
        width: 240px;
        height: 480px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .download-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        flex-direction: column;
        background: var(--bg-card);
        padding: 80px 32px 32px;
        gap: 24px;
        transition: var(--transition);
        border-left: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a:not(.btn)::after {
        display: none;
    }
    
    .hero-title {
        font-size: 42px;
    }
    
    .hero-subtitle {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .download-cards {
        grid-template-columns: 1fr;
    }
    
    .guide-steps {
        flex-direction: column;
    }
    
    .guide-connector {
        width: 2px;
        height: 40px;
        margin: 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 36px;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 24px;
    }
    
    .phone-mockup {
        width: 200px;
        height: 400px;
    }
    
    section {
        padding: 60px 0;
    }
}